package com.juzi.wopu.query;

import org.apache.commons.lang3.StringUtils;

public class SysCodeQuery extends BaseQuery{
	
	private String sName=null;
	
	private Long iId=null;
	
	private Long iType;
	
	private Long iParentId;

	public SysCodeQuery() {
		super("SysCode");
	}
	
	@Override
	protected void addWhere() {
		if (StringUtils.isNotBlank(sName)) {
			AddWhere("o.sName like ?", "%" + sName + "%");
		}
		
		if (iId!=null) {
			AddWhere("o.iId = ?", iId);
		}
		
		if(iType !=null && iType != -1L){
			AddWhere("o.iType=?", iType);
		}
		
		if(iParentId !=null && iParentId != -1L){
			AddWhere("o.iParentId=?", iParentId);
		}
	}

	public String getsName() {
		return sName;
	}

	public void setsName(String sName) {
		this.sName = sName;
	}

	public Long getiId() {
		return iId;
	}

	public void setiId(Long iId) {
		this.iId = iId;
	}

	
	public String getSName() {
		return sName;
	}

	public void setSName(String sName) {
		this.sName = sName;
	}

	public Long getIId() {
		return iId;
	}

	public void setIId(Long iId) {
		this.iId = iId;
	}

	public Long getiType() {
		return iType;
	}

	public void setiType(Long iType) {
		this.iType = iType;
	}

	public Long getiParentId() {
		return iParentId;
	}

	public void setiParentId(Long iParentId) {
		this.iParentId = iParentId;
	}

	public Long getIType() {
		return iType;
	}

	public void setIType(Long iType) {
		this.iType = iType;
	}

	public Long getIParentId() {
		return iParentId;
	}

	public void setIParentId(Long iParentId) {
		this.iParentId = iParentId;
	}
	
}
